
#ifndef _CINPUT_H_
#define _CINPUT_H_

#include <SDL.h>
#include <vector>
#include <windows.h>

enum Input_EventType
{
		INPUT_KEYDOWN			= 1,
		INPUT_KEYUP				= 2,
		INPUT_RBUTTONDOWN	= 4,
		INPUT_LBUTTONDOWN	= 8,
		INPUT_MBUTTONDOWN	= 16,
		INPUT_MBUTTONUP		= 32,
		INPUT_RBUTTONUP		= 64,
		INPUT_LBUTTONUP		= 128,
		INPUT_WHELLUP			= 256,
		INPUT_WHELLDOWN		= 512,
		INPUT_MOUSEMOVE		= 1024
};

struct Input_Event
{
	Input_EventType type;
	SDLKey key;
	Uint16 x;
	Uint16 y;
};

class CInputManager
{
public:
	CInputManager();
	~CInputManager();

	bool GetKeyState(SDLKey Key);

	void GetMousePos(int* x, int* y);
	void SetMousePos(Uint16 x, Uint16 y);

	void _BuildEvent(Input_EventType type, SDLKey key, Uint16 x, Uint16 y);
	void _ClearEvent();

private:
	std::vector<Input_Event>	m_Events;
	Uint8*						m_keystate;
};


#endif